package com.rds.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rds.common.annotation.Excel;
import com.rds.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 类型字段属性对象 rda_type_attribute
 *
 * @author rds
 * @date 2021-10-19
 */
public class RdaTypeAttribute extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyTime;

    /** 对应rda_type.id */
    @Excel(name = "对应rda_type.id")
    private Integer typeid;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 所有者 */
    @Excel(name = "所有者")
    private Integer ownerid;

    /** 默认值 */
    @Excel(name = "默认值")
    private String defaultVal;

    /** 列名称 */
    @Excel(name = "列名称")
    private String columnName;

    /** 列描述 */
    @Excel(name = "列描述")
    private String columnComment;

    /** 列类型 */
    @Excel(name = "列类型")
    private String columnType;

    /** 是否主键（1是） */
    @Excel(name = "是否主键", readConverterExp = "1=是")
    private Integer isPk;

    /** 是否自增（1是） */
    @Excel(name = "是否自增", readConverterExp = "1=是")
    private Integer isIncrement;

    /** 是否必填（1是） */
    @Excel(name = "是否必填", readConverterExp = "1=是")
    private Integer isRequired;

    public Integer getColumnLength() {
        return columnLength;
    }

    public void setColumnLength(Integer columnLength) {
        this.columnLength = columnLength;
    }

    /** 字段长度 */
    @Excel(name = "字段长度")
    private Integer columnLength;

    /** JAVA类型 */
    @Excel(name = "JAVA类型")
    private String javaType;

    /** JAVA字段名 */
    @Excel(name = "JAVA字段名")
    private String javaField;

    public String getJavaType() {
        return javaType;
    }

    public void setJavaType(String javaType) {
        this.javaType = javaType;
    }

    public String getJavaField() {
        return javaField;
    }

    public void setJavaField(String javaField) {
        this.javaField = javaField;
    }

    @Override
    public String getUpdateBy() {
        return updateBy;
    }

    @Override
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    /** 更新人 */
    @Excel(name = "更新人")
    private String updateBy;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setModifyTime(Date modifyTime)
    {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime()
    {
        return modifyTime;
    }
    public void setTypeid(Integer typeid)
    {
        this.typeid = typeid;
    }

    public Integer getTypeid()
    {
        return typeid;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setOwnerid(Integer ownerid)
    {
        this.ownerid = ownerid;
    }

    public Integer getOwnerid()
    {
        return ownerid;
    }
    public void setDefaultVal(String defaultVal)
    {
        this.defaultVal = defaultVal;
    }

    public String getDefaultVal()
    {
        return defaultVal;
    }
    public void setColumnName(String columnName)
    {
        this.columnName = columnName;
    }

    public String getColumnName()
    {
        return columnName;
    }
    public void setColumnComment(String columnComment)
    {
        this.columnComment = columnComment;
    }

    public String getColumnComment()
    {
        return columnComment;
    }
    public void setColumnType(String columnType)
    {
        this.columnType = columnType;
    }

    public String getColumnType()
    {
        return columnType;
    }
    public void setIsPk(Integer isPk)
    {
        this.isPk = isPk;
    }

    public Integer getIsPk()
    {
        return isPk;
    }
    public void setIsIncrement(Integer isIncrement)
    {
        this.isIncrement = isIncrement;
    }

    public Integer getIsIncrement()
    {
        return isIncrement;
    }
    public void setIsRequired(Integer isRequired)
    {
        this.isRequired = isRequired;
    }

    public Integer getIsRequired()
    {
        return isRequired;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("modifyTime", getModifyTime())
            .append("typeid", getTypeid())
            .append("status", getStatus())
            .append("ownerid", getOwnerid())
            .append("defaultVal", getDefaultVal())
            .append("columnName", getColumnName())
            .append("columnComment", getColumnComment())
            .append("columnType", getColumnType())
                .append("columnLength", getColumnLength())
            .append("isPk", getIsPk())
            .append("isIncrement", getIsIncrement())
            .append("isRequired", getIsRequired())
                .append("javaType", getJavaType())
                .append("javaField", getJavaField())
                .append("updateBy", getUpdateBy())
            .toString();
    }
}
